package be.teletask.onvif.requests;

import be.teletask.onvif.listeners.GetAudioDecoderConfigurationOptionsListener;
import be.teletask.onvif.listeners.GetAudioOutputsListener;
import be.teletask.onvif.models.OnvifMediaProfile;
import be.teletask.onvif.models.OnvifType;


/**
 * Created by Tomas Verhelst on 04/09/2018.
 * Copyright (c) 2018 TELETASK BVBA. All rights reserved.
 */
public class GetAudioDecoderConfigurationOptionsRequest implements OnvifRequest {

    //Constants
    public static final String TAG = GetAudioDecoderConfigurationOptionsRequest.class.getSimpleName();

    //Attributes
    private final GetAudioDecoderConfigurationOptionsListener listener;
    private OnvifMediaProfile mediaProfile;

    //Constructors
    public GetAudioDecoderConfigurationOptionsRequest(OnvifMediaProfile mediaProfile, GetAudioDecoderConfigurationOptionsListener listener) {
        this.mediaProfile = mediaProfile;
        this.listener = listener;
    }

    //Properties
    public GetAudioDecoderConfigurationOptionsListener getListener() {
        return listener;
    }

    @Override
    public String getXml() {
        return "<GetAudioDecoderConfigurationOptions xmlns=\"http://www.onvif.org/ver10/media/wsdl\">" +
                "<ProfileToken>" + mediaProfile.getToken() + "</ProfileToken>" +
                "<ConfigurationToken>" + mediaProfile.getAudioDecoderToken() + "</ConfigurationToken>" +
                "</GetAudioDecoderConfigurationOptions>";
    }

    @Override
    public OnvifType getType() {
        return OnvifType.GET_AUDIO_DECODER_CONFIGURATION_OPTIONS;
    }

}
